package cn.edu.scau.cmi.luochenghao.chapter06;

class University {
	void enterRule(double math,double english,double chinese) {
		double total=math+english+chinese;
		if(total>=200)
			System.out.println(total+"分达到大学录取线");
		else
			System.out.println(total+"分未达到大学录取线");
	}
}

class ImportantUniversity extends University {
	void enterRule(double math,double english,double chinese) {
		double total=math+english+chinese;
		if(total>=245)
			System.out.println(total+"分达到大学录取线");
		else
			System.out.println(total+"分未达到大学录取线");
	}
}

public class Exmaple6_2 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		double math=64,english=76.5,chinese=66;
		ImportantUniversity univer=new ImportantUniversity();
		univer.enterRule(math, english, chinese);
		math=89;
		english=80;
		chinese=86;
		univer=new ImportantUniversity();
		univer.enterRule(math, english, chinese);
	}

}
